package com.example.adapter;

import java.util.List;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.TextView;
import com.example.domain.ShouCe;
import com.example.mypro.R;

public class Sc_LvAdapter extends BaseAdapter {
	private List<ShouCe> list;
	private Context context;

	public Sc_LvAdapter(List<ShouCe> list, Context context) {
		this.list = list;
		this.context = context;
	}

	@Override
	public int getCount() {
		return list.size();
	}

	@Override
	public Object getItem(int arg0) {
		return list.get(arg0);
	}

	@Override
	public long getItemId(int arg0) {
		return arg0;
	}

	@Override
	public View getView(int arg0, View arg1, ViewGroup arg2) {
		View view = LayoutInflater.from(context).inflate(R.layout.xw_lv_item,
				null);
		TextView tVbt = (TextView) view.findViewById(R.id.xw_lv_title);
		tVbt.setText(list.get(arg0).getSh_bt());
		return view;
	}
}
